package com.xjmall.dao;

import com.xjmall.pojo.Comment;

import java.util.List;

public interface CommentMapper {
    int deleteByPrimaryKey(Long id);

    int insert(Comment record);

    int insertSelective(Comment record);

    Comment selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(Comment record);

    int updateByPrimaryKey(Comment record);
    // 根据商品id查询该商品所有评论
    List<Comment> selectByProductId(Integer productId);
    // 根据商品id查询该商品评论数量
    int selectCountByProductId(Integer productId);
}